<template>
  <div :class="['box-show', {'heibai':gongjiri}]" >
    <AntHeader @goHome="goHome" @goPath="goPath" @login="login"/>
    <router-view />
    <AntFooter />
    <AntRight></AntRight>
  </div>
</template>

<script>
import AntHeader from "./../components/AntHeader.vue";
import AntFooter from "./../components/AntFooter.vue";
import AntRight from "./../components/AntRight.vue";


export default {
  name: "my-main",
  props: {},
  data() {
    return {
      gongjiri: false,
    };
  },
  components: {
    AntHeader,
    AntFooter,AntRight
  },
  computed: {},
  methods: {
    goHome(){
      console.log("跳转首页")
      this.$router.push("/")
    },
    goPath(e){
      console.log("点击了菜单栏：", e);
        this.$router.push({
          name: 'ReadList',
          params: { id: e.value }
        });
        // let path = this.$route.path;
        // if(path!="/"){
        //   this.$router.go(0);
        // }
    },
    login(e){
      console.log(e)
      this.$router.push({ name: 'login', params: { mid: 0 } });
      // this.$router.push({
      //   name: 'login',
      //   params: { mid: e.value }
      // })
    },
    aidaori() {
      // var aidaoriarr = new Array("0404", "0512", "1213");
      var aidaoriarr = new Array("1213");
      //2020年4月4日
      //2008年5月12日
      //1937年12月13日
      var mydate = new Date();
      var str = "";// + mydate.getFullYear();
      var mm = mydate.getMonth() + 1;
      if (mydate.getMonth() > 9) {
        str += mm;
      } else {
        str += "0" + mm;
      }
      if (mydate.getDate() > 9) {
        str += mydate.getDate();
      } else {
        str += "0" + mydate.getDate();
      }
      if (aidaoriarr.indexOf(str) > -1) {
        return 1;
      } else {
        return 0;
      }
    }
  },
  mounted() {
    this.gongjiri = this.aidaori();
  },
};
</script>

<style>
.heibai{
  /*!*灰色*!*/
  /*!* 滤镜效果 *!*/
  filter: grayscale(100%);
  /*!* webkit内核 *!*/
  -webkit-filter: grayscale(100%);
  /*!* 火狐内核 *!*/
  -moz-filter: grayscale(100%);
  /*!* 微软内核 *!*/
  -ms-filter: grayscale(100%);
  /*!* 欧朋内核 *!*/
  -o-filter: grayscale(100%);
  /*!* ie专有滤镜 *!*/
  filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
}
</style>
